﻿using System;

namespace NavFx
{
	/// <summary>
	/// Thrown when a the current index tracker is not consistent with the actual current page
	/// </summary>
	public class InconsistentIndexException: Exception
	{
		/// <summary>
		/// Default constructor
		/// </summary>
		public InconsistentIndexException()
			: base("The CurrentIndex property is not consistent with the actual CurrentPage.  This can happen if you call the GoToPage method without updateIndex set to true and then use the NextPage or PreviousPage method.")
		{
			//nothing else to do
		}

		/// <summary>
		/// Constructor overload supporting a custom error message
		/// </summary>
		public InconsistentIndexException(string message)
			: base(message)
		{
			//nothing else to do
		}

		/// <summary>
		/// Constructor overload supporting a custom error message and inner exception
		/// </summary>
		public InconsistentIndexException(string message, Exception innerException)
			: base(message, innerException)
		{
			//nothing else to do
		}
	}
}
